home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 8
/
Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso
/
Aminet
/
util
/
misc
/
find361.lha
/
find.doc
< prev
Wrap
Text File
|
1995-07-19
|
8KB
|
163 lines
============================================================
$VER: find.doc 36.1 (19.7.95) Copyright (c) Ralph Seichter
============================================================
DESCRIPTION
I wrote 'find' because I needed a tool to find files (obviously :) which
match a given name pattern. 'find' is able to search multiple directories,
including all subdirectories, the current directory and its subdirs, or the
current CLI command path only. The output can be formatted in a way which
tries to imitate 'List LFORMAT' behaviour, and you can make 'find' create
shell scripts for you and execute them on the fly.
Please note that 'find' is pure, you can make it resident. As it is less
than 3 KB in size, this is recommended. Requires 'dos.library' V36 (OS 2.0)
or better.
COPYRIGHT NOTICE
This program is Copyright (c) 1995 Ralph Seichter, all rights reserved.
You may however freely use it and give copies to your friends, as long as
you don't add data to or remove data from the distribution archive. You may
*NOT* include any part of the distribution archive in a commercial software
package. If you have comments or suggestions, feel free to contact me. Use
PGP-encrypted Email when possible, you can find my public key at the end of
this file.
Ralph Seichter Email: zodiac@darkness.gun.de
Am Christenrain 12 Phone: +49-2667-969000
56479 Stein-Neukirch
Germany
USAGE EXAMPLES
Locate all C source files on partition DH1:
-> find #?.c dh1:
Find all Icons in the current directory and all its subdirs, but
don't display the ".info" suffix.
-> find #?.info lformat %m
Get rid of all files with the prefix "foo" on some partitions, but
don't go deeper than three subdirectory levels while scanning.
-> find foo#? sys: dh2: bozo: depth=3 lformat="delete %p%n" exec
Find 'Type' in the command path.
-> find Type path
Find all occurences of 'bar' in the command path.
-> find bar full
I hope that these few examples show some of the potential of 'find'. The
possibility to create shell scripts and have them executed without further
interaction is certainly very useful for many tasks.
COMMAND TEMPLATE
PATTERN/A Any OS name pattern, i.e. "#?.info".
DIRECTORY/M List of directories to scan. If omitted, only the current
directory and its subdirectories will be searched.
DEPTH/K/N Number of subdirectory levels (recursion depth). DEPTH=0
means no subdirs, DEPTH=1 one subdir level, and so on.
LFORMAT/K Format string. You can use a subset of the templates known
from 'List LFORMAT' to modify the output. As an example, a
file called "dh0:foo/bar.c" shall be used.
%e Name suffix .c
%f Full path and name dh0:foo/bar.c
%m Name without suffix bar
%n Full name bar.c
%p Fully qualified path dh0:foo/
%% Percent sign %
LFORMAT defaults to %f (full path and name).
EXEC/S Create shell script using the given LFORMAT string. You
must specify LFORMAT, or EXEC will be ignored.
FULL/S Check full command path instead of stopping with the first
match (FULL implies PATH).
PATH/S Find first matching file in the current CLI command path.
VERBOSE/S Print the names of all directories when they are scanned.
DISCLAIMER
THIS MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE, INCLUDING WITHOUT LIMITATION
ANY IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE USE, RESULTS, AND
PERFORMANCE OF THIS MATERIAL IS ASSUMED BY YOU AND IF THE PRODUCT SHOULD
PROVE TO BE DEFECTIVE, YOU ASSUME THE ENTIRE COST OF ALL NECESSARY
SERVICING, REPAIR, OR OTHER REMEDIATION.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2i
mQBNAi7dDgAAAAECANd1hBXK8RLHVmJxmhuq6hFS1HBIPHC7YImTZFs10d3FfQFe
63xBabCJxzQh06ODARdYuE7i9PfKqxQX9aw2mMEABRG0J1JhbHBoIFNlaWNodGVy
IDx6b2RpYWNAZGFya25lc3MuZ3VuLmRlPokAlQMFEDABpzFP7Zu19QzSjQEBTjAD
/RXsUrWM8Eh8h0vU/b8d/unRqhIxTNHQIuKbHVJl0AQhr6KixvQYXTyof6d28CEM
bd01WgGQ0OopBo3C/aorCpXgcxUwzYDm6MtDU6+uG/KoHyiBRBcke1DHkZQJn6a2
0YPwwoota1YoLeRvLFLbFWenSzmvoy3at2q/TcKGP8XFiQCVAgUQL/c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